<?php
/**
 * General String Utilities
 * 
 * @package Bedrock
 * @author Nick Williams
 * @version 1.0.0
 * @created 08/11/2008
 * @updated 08/11/2008
 */
class Bedrock_Common_StringUtils extends Bedrock {
	/**
	 * Simplifies a string, replacing spaces with underscores, removing
	 * punctuation, etc.
	 *
	 * @param string $string the string to simplify
	 * @return string the simplified string
	 */
	public static function simplify($string) {
		// Setup
		$result = $string;
		
		// Simplify String
		$result = trim($result);
		$result = str_replace(' ', '_', $result);
		$result = strtolower($result);
		
		return $result;
	}
}
?>